#!/bin/bash
name=$(lsof -i:5204|tail -1|awk '"$1"!=""{print $2}')
if [ -z $name ]
then
	echo "###############启动litemall###################"
	cd /opt/project/litemall/
	nohup java -Dfile.encoding=UTF-8 -jar litemall-all-0.1.0-exec.jar > all-temp.txt &
	exit 0
fi
id=$(lsof -i:5204|tail -1|awk '"$1"!=""{print $2}')
kill -9 $id

echo "###############5204以关闭  kid:$id  启动litemall######################"
cd /opt/project/litemall/
nohup java -Dfile.encoding=UTF-8 -jar litemall-all-0.1.0-exec.jar >all-temp.txt &

exit 0 


